<?php
use yii\helpers\Html;
use zhtfrontend\models\datas\Mechanic;
use common\components\helpers\Fun;
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height ">
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <?= Html::beginForm(Fun::url(['orders/index']), 'get', ['enctype' => 'multipart/form-data']) ?>
        <?= \common\components\helpers\Search::textInput('sn', null, ['label'=>'订单号','class' => 'search  yx-width150 zx-lh24 yx-ml6']); ?>
        <?= \common\components\helpers\Search::textInput('name', null, ['label'=>'会员名称','class' => 'search  yx-width150 zx-lh24 yx-ml6']); ?>
        <?= \common\components\helpers\Search::textInput('mobile', null, ['label'=>'电话号码','class' => 'search yx-input-text zx-width150 yx-ml6']); ?>
        <?=\common\components\helpers\Search::dropDownList('mechanic_id',null,$mechanic,['label'=>'机构','promote'=>'请选择','class'=>'search diy_select_txt'])?>
        <?=\common\components\helpers\Search::dropDownList('year',null,[null=>'请选择',2016=>'2016',2017=>'2017',2018=>'2018',2019=>'2019',2020=>'2020'],['label'=>'年份','promote'=>'请选择','class'=>'search diy_select_txt'])?>
        <?=\common\components\helpers\Search::dropDownList('mouth',null,[null=>'请选择',1=>'一月',2=>'二月',3=>'三月',4=>'四月',5=>'五月',6=>'六月',7=>'七月',8=>'八月',9=>'九月',10=>'十月',11=>'十一月',12=>'十二月'],['label'=>'月份','promote'=>'请选择','class'=>'search diy_select_txt'])?>
        <?=\common\components\helpers\Search::dropDownList('types',null,[null=>'请选择',1=>'当月',2=>'历史'],['label'=>'统计方式','promote'=>'请选择','class'=>'search diy_select_txt'])?>
        <?= \common\components\helpers\Search::submitButton('搜索', ['id'=>'search-handle','class'=>"yx-search yx-radius2"]); ?>
        <?php Html::endForm() ?>
    </div>
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check" data-tablesaw-mode="swipe" data-tablesaw-minimap>
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?=\Yii::t('zhtfrontend','ID');?></th>
                <th><?=\Yii::t('zhtfrontend','订单编号');?></th>
                <th><?=\Yii::t('zhtfrontend','会员');?></th>
                <th><?=\Yii::t('zhtfrontend','联系电话');?></th>
                <th><?=\Yii::t('zhtfrontend','订单总额');?></th>
                <th><?=\Yii::t('zhtfrontend','实际支付');?></th>
                <th><?=\Yii::t('zhtfrontend','现金支付');?></th>
                <th><?=\Yii::t('zhtfrontend','奖学金支付');?></th>
                <th><?=\Yii::t('zhtfrontend','优惠总额');?></th>
                <th><?=\Yii::t('zhtfrontend','下单时间');?></th>
                <th><?=\Yii::t('zhtfrontend','状态');?></th>
                <th><?=\Yii::t('zhtfrontend','支付方式');?></th>
                <th><?=\Yii::t('zhtfrontend','支付状态');?></th>
                <th><?=\Yii::t('zhtfrontend','保证金');?></th>
                <th><?=\Yii::t('zhtfrontend','发货状态');?></th>
                <th><?=\Yii::t('zhtfrontend','类型');?></th>
                <th><?=\Yii::t('zhtfrontend','操作');?></th>
            </tr>
            </thead>
            <?php if($data):?>
                <?php foreach($data as $item):?>
                    <tr data-id="<?=$item['id']?>">
                        <td><?=$item['id']?></td>
                        <td><?=$item['sn']?></td>
                        <td><?=$item['customer_name']?></td>
                        <td><?=$item['telephone']?></td>
                        <td><?=$item['total_amount']?></td>
                        <td><?=$item['final_amount']?></td>
                        <td><?=$item['cash_money']?></td>
                        <td><?=$item['scholarship_money']?></td>
                        <td><?=$item['discount_amount']?></td>
                        <td><?=$item['created_at']?></td>
                        <td><?=$item['status_name']?></td>
                        <td><?=$item['payment_name']?></td>
                        <td><?=$item['pay_status_name']?></td>
                        <td><?=$item['deposit']?></td>
                        <td><?=$item['ship_status_name']?></td>
                        <td><?=$item['appointment_name']?></td>
                        <td><?=$item['operate']?></td>
                    </tr>
                <?php endforeach;?>
            <?php endif;?>
        </table>
        <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
    </div>
</div>




